package lab02.test05;

public class Cobe {
    //构造函数
    Cobe(){};

    //属性：立方体的长、宽、高，立方体的体积
    float lenght;
    float width;
    float height;
    float volume;

    //行为：
    Cobe (float x,float y,float z){
        lenght=x;
        width=y;
        height=z;
    }
    //计算体积
    float volume(){
        return width*height*lenght ;
    }

    public static void main(String[] args) {
        Cobe bulk=new Cobe(3,4,5) ;
        bulk.volume();
    }

}
